package pages;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.Link;

public class BasePage extends WebPage {

	public BasePage(){
		link("lnkHome", "lblHome", "Home Page", HomePage.class);
		link("lnkCustomers", "lblCustomer", "Customer List", CustomerList.class);
		link("lnkDropDown", "lblDropDown", "Drop Down", DropDownPage.class);
		link("lnkRadio", "lblRadio", "Radio", RadioButtonPages.class);
		link("lnkCustInfo", "lblCustInfo", "Customer Info", CreateCustInfo.class);
	}
	
	@SuppressWarnings({ "serial", "rawtypes" })
	private void link(String linkId, String labelId, String labelName, final Class clazz){
		Link lnkHome = new Link(linkId) {
			@Override
			public void onClick() {
				setResponsePage(clazz);
			}
		};
		
		Label lblHome = new Label(labelId, labelName);
		lnkHome.add(lblHome);
		add(lnkHome);
	}
	
	
	
}
